package com.zlict.commonelasticsearch.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

/**
 * 审计日志实体类
 * 
 * @author zlict
 */
@Data
@Document(indexName = "audit-logs")
public class AuditLog {
    
    @Id
    private String id;
    
    @Field(type = FieldType.Long)
    private Long userId;
    
    @Field(type = FieldType.Text)
    private String username;
    
    @Field(type = FieldType.Text)
    private String actionType;
    
    @Field(type = FieldType.Date)
    private Date actionTime;
    
    @Field(type = FieldType.Text)
    private String actionResult;
    
    @Field(type = FieldType.Text)
    private String ipAddress;
    
    @Field(type = FieldType.Text)
    private String userAgent;
    
    @Field(type = FieldType.Text)
    private String deviceInfo;
    
    @Field(type = FieldType.Text)
    private String details;
    
    @Field(type = FieldType.Date)
    private Date createTime;
}




